Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Functions / Getting and Setting Style Attributes


GXGetStyleAttributes

You can use the GXGetStyleAttributes function to determine which style attributes are set for a particular style object.

gxStyleAttribute GXGetStyleAttributes(gxStyle source);
source
A reference to the style object whose style attributes you want to determine.
function result
The style attributes associated with the source style object.
DESCRIPTION
The GXGetStyleAttributes function returns as its function result the style attributes of the style object specified by the source parameter.

As an example, to examine the gxSourceGridStyle flag of a style object referenced by the variable source, you could use this code:

if (GXGetStyleAttributes(source) & gxSourceGridStyle) {
   /* style has gxSourceGridStyle attribute set */
}
The gxCenterFrameStyle attribute is set only if both the gxInsideFrameStyle and the gxOutsideFrameStyle attributes are clear, so if you want to test for a centered frame style you need this code:

if (GXGetStyleAttributes(source) & 
   (gxInsideFrameStyle | gxOutsideFrameStyle) == 
   gxCenterFrameStyle) {
   /* style has gxCenterFrameStyle attribute set */
}
ERRORS, WARNINGS, AND NOTICES
Errors
out_of_memory
style_is_nil
SEE ALSO
For a discussion of style attributes, see "Style Attributes" on page 3-98.

For an example of pen placement, see "Manipulating Pen Width and Placement" on page 3-51.

For an example of constraining shapes to grids, see "Constraining Shape Geometries to Grids" on page 3-40 and "Constraining Shapes to Device Grids" on page 3-42.

To examine the style attributes of a style object associated with a particular shape, use the GXGetShapeStyleAttributes function, which is described on page 3-112.

To alter the style attributes of a style object, use the GXSetStyleAttributes function, which is described in the next section.

To alter the style attributes of a style object associated with a particular shape, use the GXSetShapeStyleAttributes function, which is described on page 3-113.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help